package org.suze.springboot.base.model;

import java.io.Serializable;
import java.text.MessageFormat;

/**
 * @description:
 * @Date : 下午12:41 2017/9/11
 * @Author : 石冬冬-Heil Hitler(dongdong.shi@mljr.com)
 */
public abstract class BaseModel<PK extends Number > implements Serializable{

    public PK id;
    public String prefix;


    public final String getKey(){
        return MessageFormat.format("{0}:{1}",this.getPrefix(),this.getId());
    }


    public PK getId() {
        return id;
    }

    public void setId(PK id) {
        this.id = id;
    }

    public String getPrefix() {
        return prefix;
    }
}
